Xbasic

a5w_letter_saveas Function

Syntax

Result as C = a5w_letter_saveAs(C LayoutName [,C Saveas_format [,C Filter [,C Order [,C Filename [,P globalVariables [,P PrintOptions [,SQL::Arguments Arguments [,P Options ]]]]]]]])

Arguments

LayoutNameCharacter

Letter to print.

Saveas_formatCharacter

Type of file to create (PDF/Excel/HTML/RTF/Text)

FilterCharacter

Filter expression to apply to letter.

OrderCharacter

Order expression to apply to letter detail.

FilenameCharacter

Name of file to create or a JSON string defining criteria to upload the report to Amazon S3 or email the report using SparkPost or SendGrid. See a5w_report_saveas() for more info.

globalVariablesPointer

A pointer to the global variables. See a5w_report_saveas() for more details.

PrintOptionsPointer

PDF Driver options. See Report.SaveAs() for more details.

ArgumentsSQL::Arguments

SQL Arguments (if required by the letter data source). See Report.SaveAs() for more details.

OptionsPointer

See Report.SaveAs() for more details.

Description

The a5w_letter_saveas() method prints LayoutName to file in PDF, HTML, RTF, or TXT formats. If no format is specified, the PDF format is used. If a letter needs to get access to global variables defined in a .a5w page, you must call this function, and not Letter.SaveAs()

Discussion

A5w_letter_saveas is the method to call to generate a letter from the Application Server.

Example

a5w_letter_saveAs("customer List","PDF","","","c:\data\custlist.pdf",global_variables())

See Also